India’s ambitious programme to connect every Indian with a digital identity number, otherwise known as the Aadhar programme, is now in court being challenged on grounds of privacy. Activists claim that the Aadhaar programme is, essentially, building a surveillance state. They are also concerned about how sensitive data will be stored and used.

Nandan Nilekani, the first head of the Unique Identification Authority of India (UIDAI), which is the body that run the Aadhaar project, rubbishes these arguments. He says these fears are overrated. In fact, he says, the use of Aadhaar as verification has already saved the government $9 billion by cleaning up misuse of federal funds. The current UIDAI chairman, Bhushan Pandey, adds that at worst, Aadhaar has some teething problems.

Meanwhile, there are those like developmental economist and activist, Jean Drèze, who say that while the idea to streamline identification for government services using technology is good, it is an idea ahead of its time. Drèze says there are basic problems such as infrastructure that need to be solved before technology is adopted in such a large way.

The matter is now before the Supreme Court which is also to adjudicate on the extent to which the state can use Aadhaar as an identification tool. For instance, could it make it mandatory for services like mobile phone connections, bank accounts, and driving licences?

The arguments for and against Aadhaar have by now been made too often to repeat. But here’s something that has rarely been considered. Proponents of Aadhaar often cite the example of the U.S. social security number. That instantly gives opponents a weapon; the U.S., they say rightly, is a more advanced economy with established infrastructure and a single language. India isn’t, and will never be, that.

Which is why I say that a more relevant example is that of South Africa. Economy and development-wise, the country is closer to India than the U.S. The government had launched a social security scheme under the South Africa Social Security Agency (SASSA). SASSA has an annual budget of around $15 billion; it makes 17.4 million payments every month to 32% of the population ranging from $31 for child support to $135 to assist the elderly. Predictably, though, this system had been systematically defrauded of millions of dollars every year.

In an attempt to bring down fraud, SASSA in 2012 gave a contract to Mastercard in association with Grindrod, a local banking major, and Net1, a universal payment technology platform, to devise a mechanism to plug the fraud and bring down cost of transactions.

The Mastercard combine’s scheme was simple: first re-register all recipients of government handouts using biometrics (fingerprints mainly), voice recognition, and photographs. Then, all the newly registered beneficiaries were issued with a debit card (from Mastercard in association with Grindrod) and a PIN. Every beneficiary was told to reconfirm their identity using a fingerprint scan or a voice call every month. Payments were stopped to those who did not comply with this monthly exercise.

By 2013, some 900,000 fake recipients were removed from the system saving $200 million and bringing down distribution costs from $3.60 per person to $1.40. More, the exercise improved banking coverage in South Africa from 67% to 75% of the population, according to South African government data.

On the flip side, the scheme was heavily criticised by older vendors; one SASSA official was even shot in the early years. Ironically, the same year when SASSA-Net1 was celebrating its success, the Constitutional Court in South Africa declared the contract invalid but at the same time extended it for five years for corrections to be made.

“The five-year extension did not produce the desirable outcome. In the failure of corrective measures, the court granted a further extension of the CPS (Net1) contract for the payment of social grants. The court further extended the suspension of the declaration of invalidity of the contract for a period of 12 months, ending March 31, 2018. SASSA further requested an extension of the contract in order to allow a phase-in-phase-out process for a period of six-months – which the court granted,” South African Social Development Minister Susan Shabangu said in a SASSA budget speech earlier this year.

Be that as it may, the process of direct transfer has taken root (there are now 10.6 million cards in use), and in a classic public-private partnership manoeuvre in developing countries, SASSA is now working to run the direct transfers in-house having recently completed two million transactions. It is also working in partnership with the South African Post Office (SAPO) for a card swap that keeps away third-party vendors. Meanwhile, Net1 is pitching to lower to price to retain the business.

The moral of the story seems clear: there is a definite need for technology to plug large leakages in government funds distribution. And if that is to work on a large scale, the government will need political bipartisan agreement. And, above all, be willing to cede control for a while to a public-private partnership, if that’s what it will take.

Follow us on Facebook, X, YouTube, Instagram and WhatsApp to never miss an update from Fortune India. To buy a copy, visit Amazon.